package com.iplant.mes.serviceImpl.dao.bcm;

import com.iplant.base.po.OutResult;
import com.iplant.base.utils.annotation.dao.DBBaseDAO;
import com.iplant.base.utils.sql.BaseDAO;
import com.iplant.basic.service.po.bms.BMSEmployee;
import com.iplant.mes.service.po.bcm.BCMRule;
import lombok.extern.slf4j.Slf4j;

import java.util.*;

@DBBaseDAO(BCMRule.class)
@Slf4j
public class BCMRuleDAO extends BaseDAO {

    private static BCMRuleDAO Instance = null;

    public static BCMRuleDAO getInstance() {
        if (Instance == null) {
            Instance = new BCMRuleDAO();
        }
        return Instance;
    }

    public BCMRuleDAO() {
        super("");this.Init();
    }


    public BCMRule BCM_GetRuleByType(BMSEmployee wLoginUser, int wType,int wProductType, OutResult<Integer> wErrorCode) {
        Map<String, Object> wParams = new HashMap<>();
        wParams.put("ComponentType", wType);
        wParams.put("ProductTypeID", wProductType);
        wParams.put("Active", 1);
        return this.SelectPO(wLoginUser, wParams, wErrorCode);
    }


}
